{include file=$header_start}
{strip}
<script type="text/javascript" src="{$siteroot}/includes/js/admin/checkall.js" /></script>
{/strip}
{include file=$header_end}

 <div class="contain">
 
      {include file=$left_menu}
      
      <div class="right_contain">
        
         <div class="heading_box">Forums Comment </div>
         <div class="whitebox">
         
         <!--Message Div Start-->
         {if $msg}
         <div class="masg_div">
         	{$msg}
         </div>
         {/if}
         <!--Message Div End-->
         
         <div>
          <!--Form Contain start-->
           
           <div class="table_viewbox">
            <!--<h2>Table Design</h2>-->
            <form name="searchFrm" id="searchFrm" method="post" action="">
             <input type="hidden" id="hidden_pageno" name="hidden_pageno" value="{$page}"/> 
            	<table width="100%" border="0" cellpadding="3" cellspacing="5">
                	<tr>
                    	<td align="left"></td>
                        <td align="right">
                        
                        &nbsp;<input type="text" name="search" id="search" class="input41" value="{if $search neq ''}{$search}{else}Search by Comment{/if}" onfocus="this.value=''" onblur="if(this.value=='')this.value='Search by Comment'" />&nbsp;<input type="submit" name="add" id="add" value="Search" class="admin_btn" />&nbsp;<input type="button" name="add" id="add" value="Clear" class="admin_btn" onclick="javascript: window.location='{$siteroot}/admin/home.php?q=forumcomments&forum_id={$forum_id|base64_encode}';" />&nbsp;<input type="button" name="add" id="add" value="Back" class="admin_btn" onclick="javascript: window.location='{$siteroot}/admin/home.php?q=forums';" />
                        </td>
                    </tr>
                </table>
            </form>
            
            <form name="frm" id="frm" action="" method="post" >
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_viewbox">
              <tr>
                <th width="5%" align="center">#</th>
                <th width="2%"><input type="checkbox" name="check" id="check"  /></th>
                <th width="40%">Comment</th>
                <th width="22%">User Name</th>
                <th width="15%">Added Date</th>
                <th width="16%">Action</th>
              </tr>
              {if $forumCommentArray}
              {section name=i loop=$forumCommentArray}
              <tr class="inactiverow" id="tr_{$forumCommentArray[i].id}">
                <td align="center">{$newid}</td>
                <td><input type="checkbox" name="checkall[]" id="checkall_{$smarty.section.i.iteration}" value="{$forumCommentArray[i].id}" /></td>
                <td>
                <a href="{$siteroot}/admin/home.php?q=forumcommentdetails&id={$forumCommentArray[i].id|base64_encode}&forum_id={$forumCommentArray[i].forum_id|base64_encode}&page={$page}">{$forumCommentArray[i].comment|ucfirst|substr:0:60}{if $forumCommentArray[i].comment|strlen >60 }...{/if}
                </a></td>
                <td>{$forumCommentArray[i].user_name|ucfirst}</td>
                <td><a href="{$siteroot}/admin/home.php?q=forumcomments&id={$forumCommentArray[i].id|base64_encode}&forum_id={$forumCommentArray[i].forum_id|base64_encode}&page={$page}">
                {$forumCommentArray[i].comment_date|date}</a></td>
                <td>
                    <span>
                    	{if $forumCommentArray[i].status  eq '1'}
                    			<a href="{$siteroot}/admin/home.php?q=forumcomments&id={$forumCommentArray[i].id|base64_encode}&forum_id={$forumCommentArray[i].forum_id|base64_encode}&action=status&status={$forumCommentArray[i].status }&page={$page}" onclick="javascript:return confirm('Are you sure do you want to change status?');" title="Currently Active"><img src="{$siteroot}/templates/admin/img/icon_correct.png" /></a>
                        {else}
                        		<a href="{$siteroot}/admin/home.php?q=forumcomments&id={$forumCommentArray[i].id|base64_encode}&forum_id={$forumCommentArray[i].forum_id|base64_encode}&action=status&status={$forumCommentArray[i].status }&page={$page}" onclick="javascript:return confirm('Are you sure do you want to change status?');" title="Currently Inactive"><img src="{$siteroot}/templates/admin/img/close.png" /></a>
                        {/if}
                    </span>
                     <span><a href="{$siteroot}/admin/home.php?q=forumcommentdetails&id={$forumCommentArray[i].id|base64_encode}&forum_id={$forumCommentArray[i].forum_id|base64_encode}&page={$page}"><img src="{$siteroot}/templates/admin/img/icon-search.png" title="forum Details" /></a></span>
                    
                    <span><a href="{$siteroot}/admin/home.php?q=forumcomments&id={$forumCommentArray[i].id|base64_encode}&forum_id={$forumCommentArray[i].forum_id|base64_encode}&action=delete&page={$page}"><img src="{$siteroot}/templates/admin/img/icon-delete.png" title="Delete forum"/></a></span>
                </td>
              </tr>
              <!-- {$newid++} -->
              {/section}
              {else}
              <tr>
               <td colspan="6" class="error" align="center">Record Not Found</td>
              </tr>
              {/if}
               <tr>
                <td colspan="6">
               {if $forumCommentArray} 
                <div class="select_box">
                <select name="action" id="action" class="input width">
                  <option value="">Select</option>
                  <option value="active">Active</option>
                  <option value="inactive">Inactive</option>
                  <option value="delete">Delete</option>
                  </select>&nbsp;<input type="submit" class="admin_btn" value="Go" name="go" id="go" /><div id="errormsg" class="error"></div> 
                  
                  </div>
                {/if}  
                  <div class="pagination">
                  {if $pagination}{$pagination}{/if}
                  </div>
                   </td>
                  
              </tr>
            </table>
            </form>
            
         </div>
            <!--Form Contain end--> 
          
         </div>
         
         
         </div>
        </div>
      
      
      <!--right_contain end-->
      <div class="clear"></div>
    </div>
    
{include file=$footer}